package com.esxy.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@AllArgsConstructor  //有参构造
@NoArgsConstructor   //无参构造
@Data
public class TUser {
//@TableId( value="Lid")
    @TableId(type = IdType.AUTO)
    private   long id;

    private  String userName;

    private Integer age;

    private String email;

    private String password;

    private String sex;

//mp会自动执行新增时间的操作，自动添加策略
    @TableField(fill= FieldFill.INSERT)
    private Date createTime;//新增

//
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private Date updateTime;//修改

    @TableField(fill = FieldFill.INSERT)//通过自动填充来帮助我们完成初始值
    @Version
    private Integer version;//版本号
    //在自动增长的插件中添加
//    this.setFieldValByName("version", 1, metaObject);

    @TableField(fill = FieldFill.INSERT)
    @TableLogic  //逻辑删除的注解
    private Integer isDelete;


}
